package com.example.mvp.adapter

import android.content.Context
import com.example.mvp.bean.BottomChoseEntity
import com.example.mvp.binder.BaseDataBinder
import com.example.mvp.binder.DataBinder
import com.example.mvp.delegate.BottomChoseADapterDelegate

/**
 * 底部弹出选择框适配器
 * @author  chaohaipeng  on 2018/8/17.
 */
class BottomChoseAdapter(context: Context, mlist: List<BottomChoseEntity>) : BaseLibAdapter<BottomChoseADapterDelegate, BottomChoseEntity>(context, mlist){
    /**
     * 数据
     */
    val mList = mlist
    /**
     * 上下文
     */
    val mContext = context
    override fun bindEvenListener(viewDelegate: BottomChoseADapterDelegate?, position: Int) {
    }

    override fun notifyView(viewDelegate: BottomChoseADapterDelegate?, position: Int) {
        viewDelegate?.setData(mList.get(position))
    }

    override fun getDelegateClass(): Class<BottomChoseADapterDelegate> {
        return BottomChoseADapterDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return DataBinder()
    }
}